﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Watson.Core.Tools
{
    public class FormatValue
    {
        /// <summary>
        /// 截取字符串
        /// </summary>
        /// <param name="iParam"></param>
        /// <returns></returns>
        public static string InterceptString(string str, int iParam)
        {
            string result = str;
            if (str.Length > iParam)
                result = str.Substring(0, iParam) + "...";
            return result;
        }
    }
}
